import { createRouter, createWebHistory } from 'vue-router'

const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import('../views/home/home.vue')
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/login/login.vue')
  },
  {
    path: '/system',
    children: [
      {
        path: 'user',
        component: () => import('../views/system/userManagement/index.vue'),
      },
      {
        path: 'role',
        component: () => import('../views/system/roleManagement/index.vue'),
      },
      {
        path: 'route',
        component: () => import('../views/system/routingManagement/index.vue'),
      }
    ]
  }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router 